<div>

    <?php
    $form = $this->beginWidget('CActiveForm', array(
        'id' => 'message-form',
        'enableAjaxValidation' => false,
            ));
    ?>

    <?php echo $form->errorSummary($model); ?>

    <?php echo $form->hiddenField($model, 'from_user_id'); ?>
    <?php echo $form->hiddenField($model, 'to_user_id'); ?>
    
    <div>
        <?php echo $form->labelEx($model, 'title'); ?>
        <?php echo $form->textField($model, 'title', array('size' => 60, 'maxlength' => 255)); ?>
        <?php echo $form->error($model, 'title'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model, 'message'); ?>
        <?php echo $form->textArea($model, 'message', array('rows' => 6, 'cols' => 50)); ?>
        <?php echo $form->error($model, 'message'); ?>
    </div>

    <div class="row buttons">
        <?php echo CHtml::submitButton($model->isNewRecord ? TranslateUtil::t('Create') : TranslateUtil::t('Save')); ?>
        <?php echo CHtml::resetButton(TranslateUtil::t('Cancel')); ?>
    </div>

    <?php $this->endWidget(); ?>

</div><!-- form -->